package com.clt.ess.CABeen;

import java.io.Serializable;

//证书延期请求获取 taskId服务器请求参数data类（同步）
public class DelaySealCertRequestData implements Serializable {
    //用于区分请求列表单个请求的业务编码
    //必须
    private String requestID;
    //签名证书序列号
    //必须
    private String serialNumber;
    //Base64 编码的签名公钥信息（该公钥是密码设备中存储的签名私钥对应的公钥），不小于 64 字节注：证书公钥由 0x04(1 字节) + x 坐标(32 字节) +y 坐标(32 字节) 拼接而成，并作 base64 编码
    //必须
    private String subjectPublicKeyInfo;

    /**
     {
         " requestID ": "0",
         " serialNumber ": "签名证书序列号",
         " subjectPublicKeyInfo ": "base64编码的公钥"
     }
     */

    public DelaySealCertRequestData() {
    }

    public DelaySealCertRequestData(String requestID, String serialNumber, String subjectPublicKeyInfo) {
        this.requestID = requestID;
        this.serialNumber = serialNumber;
        this.subjectPublicKeyInfo = subjectPublicKeyInfo;
    }

    public String getRequestID() {
        return requestID;
    }

    public void setRequestID(String requestID) {
        this.requestID = requestID;
    }

    public String getSerialNumber() {
        return serialNumber;
    }

    public void setSerialNumber(String serialNumber) {
        this.serialNumber = serialNumber;
    }

    public String getSubjectPublicKeyInfo() {
        return subjectPublicKeyInfo;
    }

    public void setSubjectPublicKeyInfo(String subjectPublicKeyInfo) {
        this.subjectPublicKeyInfo = subjectPublicKeyInfo;
    }

    @Override
    public String toString() {
        final StringBuilder sb = new StringBuilder("{");
        sb.append("\"requestID\":\"")
                .append(requestID).append('\"');
        sb.append(",\"serialNumber\":\"")
                .append(serialNumber).append('\"');
        sb.append(",\"subjectPublicKeyInfo\":\"")
                .append(subjectPublicKeyInfo).append('\"');
        sb.append('}');
        return sb.toString();
    }
}
